<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <script src="../../../ueditor.parse.js"></script>
    <title></title>
</head>
<body>
    <h1>解析编辑的内容</h1>
    <div class="content" id="test" style="width:200px">

        <pre class="brush:js;toolbar:false;">
               moveToBookmark:function (bookmark) {
            var start = bookmark.id ? this.document.getElementById(bookmark.start) : bookmark.start,
                end = bookmark.end && bookmark.id ? this.document.getElementById(bookmark.end) : bookmark.end;
            this.setStartBefore(start);
            domUtils.remove(start);
            if (end) {
                this.setEndBefore(end);
                domUtils.remove(end);
            } else {
                this.collapse(true);
            }
            return this;
        },
        </pre>
       </div>
    <button id="BUT" onclick="CallUparse();">测试多次调用uparse是否生效</button>

    <script type="text/javascript">
        function CallUparse(){
            document.getElementById('test').innerHTML = '';
            var pre = document.createElement('pre');
            pre.className =  "brush:js;toolbar:false;";
            pre.innerHTML = 'moveToBookmark:function (bookmark) {}';
            document.getElementById('test').appendChild(pre);
            document.getElementById('BUT').parentNode.removeChild(document.getElementById('BUT'));
            uParse('.content',{
                rootPath : '../../../'
            });
        }

        uParse('.content',{
            rootPath : '../../../'
        })
    </script>

</body>
</html>
